import { z } from 'zod';
import { flattenNavigationVersions } from '../flattenNavigationVersions.js';
export const warnUnusedVersions = ({ navigation, versions }) => {
    if (versions === undefined || versions.length === 0)
        return [];
    const versionsFromNavigation = flattenNavigationVersions(navigation);
    if (versionsFromNavigation.length === 0) {
        return [
            {
                code: z.ZodIssueCode.custom,
                message: 'Versions are defined in the config, but no versions are used in the navigation',
                path: ['versions'],
            },
        ];
    }
    return [];
};
